/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ar.edu.unicen.twitter.suggest.backend.recommendation.CriterioUsuario;

import ar.edu.unicen.twitter.suggest.commons.dtos.Usuario;

/**
 *
 * @author ALeX
 */
public class CriterioFuente extends CriterioUsuario{

    float factor = 0.5f;
    @Override
    public boolean cumple(Usuario u) {
        boolean result = u.getFollowersCount()*factor>u.getFollowsCount();
        //if(!result)
        //    System.out.println(u.getScreenName()+"?"+u.getFollowersCount()/2+"<="+u.getFollowsCount());
        //else
        //    System.out.println(u.getScreenName()+"?"+u.getFollowersCount()/2+">"+u.getFollowsCount());
        return result;
    }
/*
    public static double valorFuente(Usuario u){
        return(u.getFollowsCount()-u.getFollowersCount()/
              (u.getFollowsCount()+u.getFollowersCount())+1)/2;
    }
*/
     @Override
    public void reset() {
        
    }
}
